<template>
    <div style="width:100%;height:51px;" >
        <div class="header">
            <img @click="goBack" class="left" src="/static/img/toleft.png" v-if="left" />
            {{title}}
            <div class="right"></div>
        </div>
    </div>
</template>
<script>
    export default {
        name:'Header',
        data(){
            return {
            }
        },
        props:{
            title:'',
            left:false
        },
        methods:{
            goBack(){
                this.$router.go(-1);
            }
        }
    }
</script>
<style scoped>
    .header{
        width: 100%;border-bottom: 1px solid #EBEEF5;
        background: #fff;
        position:relative;
        padding: 15px 0;
        text-align: center;
        font-size: 14px;
        color: #000;
        font-weight: 500;
        position: fixed;
        top:0;left:0;
        z-index: 1;
    }
    .header .left{
        position: absolute;
        top:15px;
        left:10px;
        width: 20px;
        height: 20px;
    }
</style>
